{extend name="layout/app" /}

{block name="title"}首页{/block}

{block name="css"}
{css href="__CSS__/index.css" /}
<style>

</style>
{/block}

{block name="content"}
<div class="jumbotron jumbotron-fluid px-0">
    <div class="container text-center text-white">
        <h4 class="display-6">基于Thinkphp的博客项目</h4>
        <p class="lead">项目仅用于学习</p>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-sm-9">
            <div class="card">
                <div class="card-body">
                    {volist name="blogs" id="blog"}
                    <div class="article-body">
                        <div>
                            <span class="article-author">{$blog.users.name}</span>
                            <span class="article-time">{$blog.updated_at}</span>
                        </div>
                        <h2 class="font-weight-bold my-3 article-title">
                            <a class="text-dark" href="{:url('/blog/'.$blog.id)}">{$blog.title}</a>
                        </h2>
                        <div class="article-des">{$blog.content}</div>
                        <div>
                            <a href="#" class="badge badge-warning mt-3 article-category">{$blog.categories.name}</a>
                        </div>
                    </div>
                    <hr>
                    {/volist}
                    <nav class="d-flex justify-content-center mt-4">
                        {$page|raw}
                    </nav>
                </div>
            </div>
        </div>
        <div class="col-sm-3 p-0">
            {include file="common/right-card" \
            imgUrl="https://img1.baidu.com/it/u=4150974412,99855446&fm=253&fmt=auto&app=138&f=JPEG?w=600&h=500"
            title="博客网站"
            content="Ghost In The Shell"
            /}
        </div>
    </div>
</div>
{/block}

{block name="js"}
<script>

</script>
{/block}
